<?php
namespace app\common\model;

class UserLabel extends Base
{
    protected $name = 'user_label';

    public function list($where)
    {
        $list = $this->where($where)->select();

        $labelModel = new Label();

        $user_label = '';
        foreach($list as $v){
            $user_label .= $labelModel->getVal(['id' => $v['label_id']], 'name')['data'] . ' ';
        }

        return $user_label;
    }
}